// 组织架构 部门接口
import request from '@/utils/request'
// 获取部门列表
export const reqGetDepts = () => request({
  url: '/company/department'
})

// 部门负责人列表
export const reqGetSimpleList = () => request({
  url: '/sys/user/simple'
})

// 新增部门
export const reqAddDept = data => request({
  method: 'post',
  url: '/company/department',
  data
})

// 根据id查询部门详情
export const reqGetDeptInfo = id => request({
  url: `/company/department/${id}`
})

// 更新部门信息
export const reqUpdateDept = (data) => request({
  method: 'put',
  url: `/company/department/${data.id}`,
  data
})
// 删除部门
export const reqDelDept = id => request({
  method: 'delete',
  url: `/company/department/${id}`
})
